package com.imooc.t;

import feign.Feign;
import feign.RequestLine;
import feign.codec.Encoder;

public class TestFeign {
    public static void main(String[] args) {
        BaiduFeignClient baiduFeignClient = Feign.builder()
            .encoder(new Encoder.Default())
            .target(BaiduFeignClient.class, "http://www.baidu.com");

        String index = baiduFeignClient.index();
        System.out.println(index);
    }
}

interface BaiduFeignClient {
    // 百度的/
    @RequestLine("GET /")
    String index();
}